import request from '@/utils/request'

// 查询普查问卷问题列表
export function listSurvey(query) {
  return request({
    url: '/system/generalsurvey/list',
    method: 'get',
    params: query
  })
}

export function listSurvey2(query) {
  return request({
    url: '/system/generalsurvey/list2',
    method: 'get',
    params: query
  })
}

export function checkStatus(query) {
  return request({
    url: '/system/generalsurvey/status',
    method: 'get',
    params: query
  })
}
// 查询普查问卷问题详细
export function getSurvey(questionId) {
  return request({
    url: '/system/generalsurvey/' + questionId,
    method: 'get'
  })
}

// 新增普查问卷问题
export function addSurvey(data) {
  return request({
    url: '/system/generalsurvey',
    method: 'post',
    data: data
  })
}

// 修改普查问卷问题
export function updateSurvey(data) {
  return request({
    url: '/system/generalsurvey',
    method: 'put',
    data: data
  })
}

// 删除普查问卷问题
export function delSurvey(questionId) {
  return request({
    url: '/system/generalsurvey/' + questionId,
    method: 'delete'
  })
}
